<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{
			margin: 0px;
			padding: 0px;
		}
		li{
			list-style: none;
		}
		.box{
			width: 400px;
			height: 230px;
			border: 1px solid #EEEEEE;
			margin: 50px auto;
		}
		.top{
			height: 30px;
			width: 100%;
		}
		.top li{
			width: 20%;
			height: 30px;
			float: left;
			line-height: 30px;
			text-align: center;
			background: #F5F5F5 url() 0 0 no-repeat;
			cursor: pointer;
		}
		.top .this{
			background: #80B600 url() 0 0 no-repeat;
			color: #fff;
		}
		.content{
			height: 200px;
			width: 400px;
			overflow: hidden;
		}
		.content ul{
			width: 2000px;
			height: 200px;
			position: relative;
			left: 0px;


		}

		.content ul li{
			height: 200px;
			width: 400px;
			float: left;
			text-align: center;
			line-height: 200px;
			font-size: 50px;
			color: #fff;
			background: #80B600 url() 0 0 no-repeat;
		}




	</style>
	<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script type="text/javascript">
		$(function  (argument) {
		
			$('.top li').click(function(event) {
				index = $(this).index();
				left = index*-400;
				$('.content ul').animate({'left': left}, 500);
				$(this).addClass('this').siblings().removeClass('this');

			});
		})
	</script>

</head>
<body>
	<div class="box">
		<ul class="top">
			<li class="this">Tab1</li>
			<li>Tab2</li>
			<li>Tab3</li>
			<li>Tab4</li>
			<li>Tab5</li>
		</ul>
		<div class="content">
			<ul>
				<li>Content1</li>
				<li>Content2</li>
				<li>Content3</li>
				<li>Content4</li>
				<li>Content5</li>
			</ul>
		</div>
	</div>
</body>
</html>